/**
 * 2010/01/15
 */
package com.googlecode.felicalib.sample.client;

import java.util.MissingResourceException;
import java.util.ResourceBundle;

/**
 * @author o.tanaka
 */
public final class Messages {
    private static final String BUNDLE_NAME =
        "com.googlecode.felicalib.sample.client.messages";

    private static final ResourceBundle RESOURCE_BUNDLE =
        ResourceBundle.getBundle(Messages.BUNDLE_NAME);

    /**
     * @param key
     *            message key
     * @return string
     */
    public static String getString(final String key) {
        try {
            return Messages.RESOURCE_BUNDLE.getString(key);
        } catch (final MissingResourceException e) {
            return '!' + key + '!';
        }
    }

    private Messages() {
    }
}
